/*
	Copyright (C) 2009 Salil Bhagurkar
	
	This file is part of ViSE
	
	ViSE is free software: you can redistribute it and/or modify
	it under the terms of the GNU Lesser General Public License as published by
	the Free Software Foundation, either version 3 of the License, or
	(at your option) any later version.
	
	ViSE is distributed in the hope that it will be useful,
	but WITHOUT ANY WARRANTY; without even the implied warranty of
	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
	GNU Lesser General Public License for more details.
	
	You should have received a copy of the GNU Lesser General Public License
	along with ViSE.  If not, see <http://www.gnu.org/licenses/>.
*/

#ifndef _CMDLINE_H_
#define _CMDLINE_H_

/*Commandline library functions (non-standard)*/

//Convert a number in a buffer to an unsigned long
unsigned long getnumber(const char *buffer);
//Get a parameter delimited by 'separator'
int getstringparameter(const char *buffer,char *ret_string,char separator,size_t ret_sno);
//Get the offset of the parameter in the source string delimited by 'separator'
int getstringparameter_offset(const char *buffer, char separator, size_t ret_sno);
//Get number of parameters
int getparamcount(const char *buffer,char separator);
//Get the parameter and convert it to a number
int getparam(const char *buffer,char separator,size_t ret_sno);
/*This function gets the string surrounded by start and end*/
int getstringenv(const char *buffer,char *ret_string,char start,char end, u32 *end_ptr);

#endif
